package sjtu.ist.warehouse4ws.service.cust;

import java.util.List;

import sjtu.ist.warehouse4ws.dao.cust.CustDepartmentDaoHibernate;
import sjtu.ist.warehouse4ws.model.CustDepartment;


public class CustDepartmentServiceImpl implements CustDepartmentService{
	private CustDepartmentDaoHibernate departmentDao;
	public void setCustDepartmentDao(CustDepartmentDaoHibernate departmentDao) {
		this.departmentDao = departmentDao;
	}
	@Override
	public List<CustDepartment> getDepartmentList() {
		// TODO Auto-generated method stub
		return  (List<CustDepartment>)departmentDao.findCustDepartment();
	}

	@Override
	public List<CustDepartment> getCompanyList() {
		// TODO Auto-generated method stub
		return (List<CustDepartment>)departmentDao.findCompany();
	}

	@Override
	public void save(List<CustDepartment> DeptList) {
		// TODO Auto-generated method stub
		departmentDao.save(DeptList);
	}

	@Override
	public List getDepartmentById(String id) {
		// TODO Auto-generated method stub
		return (List<CustDepartment>)departmentDao.findCustDepartmentById(id);
	}
	@Override
	public List getDepartmentByGroupId(Integer id) {
		// TODO Auto-generated method stub
		return (List<CustDepartment>)departmentDao.findDepartmentByGroupId(id);
	}

}
